package strategy;

import java.math.BigDecimal;

/**
 * 打折收取现金
 **/
public class CashRebate implements ICashSuper {

	private double rebate;

	public CashRebate(double rebate) {

		this.rebate = rebate;
	}

	@Override
	public double acceptCash(double money) {

		return new BigDecimal(money * rebate / 10).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}
}
